﻿using EmbeddedSharp.Core;

namespace EmbeddedSharp.Scripting.Function.IO {

    /// <summary>
    /// question = listen();
    /// response = if(question == "how are you?", "fine, thank you!", "hi");
    /// echo(response);
    /// </summary>
    public class ListenNode : FuncNode {

        public ListenNode()
            : base() {
            base.Value = "listen";
        }

        public override object Evaluate() {
            this.Value = System.Console.ReadLine();
            
            return this.Value;
        }
    }
}
